namespace jsWrite {
    function antiShake(callback:()=>void,timeNum:number){
        let timer:number | null = null
        return function(){
            const _this = this,
            args = arguments
            if(timer){
                clearTimeout(timer)
                timer = null
            }
            timer = setTimeout(() => {
                callback.apply(_this,args)
            }, timeNum);
        }
    }
}